package com.zqh.myfmmall.rowbeans.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户 
 * </p>
 *
 * @author chrimer
 * @since 2022-01-20
 */
@Data
public class Users {

    private static final long serialVersionUID = 1L;

    private String userId;

    private String username;

    private String password;

    private String nickname;

    private String realname;

    private String userImg;

    private String userMobile;

    private String userEmail;

    private String userSex;

    private LocalDate userBirth;

    /*@JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")*/
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime userRegtime;

    /*@JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")*/
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime userModtime;

}
